import request from '@/utils/request'

//  获取商品品牌分页列表
export function listBrands(query){
  return request({
    url: '/manager/goods/brand/list',
    method: 'get',
    params: query
  })
}

//  获取商品品牌列表
export function listBrandsAll(query){
  return request({
    url: '/manager/goods/brand/listAll',
    method: 'get',
    params: query
  })
}


//  变更品牌启用禁用状态
export function chgBrands(data){
  return request({
    url: '/manager/goods/brand/chgEnable',
    method: 'post',
    data: data
  })
}


// 品牌详情
export function getBrand(id) {
  return request({
    url: '/manager/goods/brand/get/' + id,
    method: 'get',
  })
}

//  添加品牌
export function addBrand(data){
  return request({
    url: '/manager/goods/brand',
    method: 'post',
    data: data
  })
}

//  编辑品牌
export function editBrand(data){
  return request({
    url: '/manager/goods/brand',
    method: 'put',
    data: data
  })
}

// 删除品牌
export function delBrand(ids) {
  return request({
    url: '/manager/goods/brand/' + ids,
    method: 'delete'
  })
}
